<!--
 * @Author: 邹涵 zouh@wizpower.com
 * @Date: 2024-06-17 09:09:47
 * @LastEditors: 邹涵 zouh@wizpower.com
 * @LastEditTime: 2024-06-24 10:50:40
 * @FilePath: \zj_front\src\views\UsageCount\index.vue
 * @Description: 
-->
<template>
  <div class="wrap">
    <!-- 搜索 -->
    <div>
      <el-card style="width: 100%; height: 100%">
        <!-- 表单搜索 -->
        <!-- <el-form size="mini" ref="batchJsForm" :label-width="formLabelWidth"> -->
        <!-- 表头查询 -->
        <!-- 第一行 -->
        <el-row type="flex" justify="start">
          <el-form size="mini" ref="batchJsForm" :label-width="formLabelWidth">
            <el-input
              placeholder="输入关键字进行过滤"
              v-model="filterText"
              size="mini"
              class="input-with-select"
            >
              <el-button slot="append" icon="el-icon-search"></el-button>
            </el-input>
          </el-form>
          <!-- <FuzzyQueryInput :api="queryUnitsNameList" labelText="机组名称" /> -->
        </el-row>
        <div style="height: 100%">
          <el-tree
            :data="dataTree"
            ref="equipmentTree"
            @check="handleCheck"
            @check-change="checkChange"
            :props="defaultProps"
            node-key="id"
            highlight-current
            :default-expanded-keys="defaultExpandedNode"
            :current-node-key="currentKey"
            :filter-node-method="filterNode"
            @node-click="handleNodeClick"
            width="75%"
          >
            <span class="custom-tree-node" slot-scope="{ node, data }">
              <el-tooltip
                class="item"
                effect="dark"
                :content="node.label"
                placement="top-start"
              >
                <span> {{ node.label }} </span>
              </el-tooltip>
            </span>
          </el-tree>
          <!-- node-key="id" -->
        </div>
        <!-- </el-form> -->
        <!-- @check-change="checkChange"  -->
      </el-card>
    </div>

    <!-- 表格 -->
    <div>
      <div class="allDIV">
        <el-form
          :inline="true"
          :model="form"
          class="demo-form-inline"
          style="margin-left: 1%"
        >
          <el-form-item label="日期选择:">
            <el-date-picker
              v-model="form.date"
              type="month"
              placeholder="选择月"
              size="mini"
            >
            </el-date-picker>
          </el-form-item>
        </el-form>
      </div>

      <div style="" class="allDIV">
        <TitleLook :title="'基础信息'"> </TitleLook>

        <div class="underTitle">
          <div
            v-for="item in titleData"
            :key="item.index"
            style="
              display: flex;
              flex-direction: row;
              align-items: center;
              font-weight: bold;
              font-size: 20px;
            "
          >
            <el-image
              style="width: 40px; height: 40px; position: relative; right: 5%"
              :src="item.src"
              fit="fill"
            ></el-image>

            <span>{{ item.name }}</span>
            <span>{{ item.total }}</span>
          </div>
        </div>
      </div>

      <div>
        <div
          style="width: 49.5%; height: 100%; margin-bottom: 10px"
          class="allDIV"
        >
          <TitleLook :title="'本月馈线信息统计'"> </TitleLook>
          <div class="underTitle2" style="height: 85%; padding-left: 10px">
            <div v-for="item in bianInfo" :key="item.index">
              <div :class="item.child_left1">
                <el-image
                  style="
                    width: 50px;
                    height: 50px;
                    position: relative;
                    border-radius: 10px;
                    right: 5%;
                  "
                  :src="item.src"
                  fit="fill"
                ></el-image>
              </div>

              <div
                style="
                  display: flex;
                  flex-direction: column;
                  width: 35%;
                  justify-content: center;
                  margin-left: 20px;
                "
              >
                <div class="child_right">
                  <span :class="item.class">{{ item.name }}</span>
                </div>

                <div class="child_right" style="color: rgb(76, 197, 176)">
                  <span :class="item.class">{{ item.value }}</span>
                  <span :class="item.class">{{ item.dw }}</span>
                </div>
              </div>
            </div>
          </div>
        </div>

        <div
          style="width: 49.5%; height: 100%; margin-bottom: 10px"
          class="allDIV"
        >
          <TitleLook :title="'供用电情况统计'"> </TitleLook>
          <div class="underTitle" style="height: 85%">
            <div
              id="count3"
              style="width: 100%; height: 100%"
              ref="count3"
            ></div>
          </div>
        </div>
      </div>

      <div>
        <div
          style="width: 49.5%; height: 100%; margin-bottom: 10px"
          class="allDIV"
        >
          <TitleLook :title="'新能源运行情况统计'"> </TitleLook>

          <div style="width: 100%; height: 85%; display: flex">
            <div
              id="count2"
              style="width: 100%; height: 100%"
              ref="count2"
            ></div>
          </div>
        </div>
        <div
          style="width: 49.5%; height: 100%; margin-bottom: 1%"
          class="allDIV"
        >
          <TitleLook :title="'负载率统计'"> </TitleLook>

          <div
            style="
              width: 100%;
              height: 85%;
              display: flex;
              flex-direction: column;
            "
          >
            <div
              id="count4"
              style="width: 100%; height: 100%"
              ref="count4"
            ></div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import TestResult from "./index.js";
export default TestResult;
</script>
<style lang="scss" scoped>
::v-deep .el-tree {
  height: 100% !important;
  overflow-x: auto !important;
}

::v-deep .el-card__body {
  height: calc(95% - 20px) !important;
}

::v-deep .el-tree-node:focus > .el-tree-node__content {
  background-color: #f2f2f2;
}

.table-html-wrap {
  overflow: hidden;
  overflow-y: auto;
}

.table-html-wrap ::v-deep table {
  // color: red;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  border-collapse: collapse;
  margin: auto;
}

.table-html-wrap ::v-deep table td {
  border-left: 1px solid #000;
  border-top: 1px solid #000;
  white-space: nowrap;
  text-align: center;
  padding: 0.5rem;
}

.table-html-wrap ::v-deep tbody tr:nth-of-type(1) {
  font-weight: bold;
  font-size: 20px;
}

.dialog-footer {
  text-align: end;
}

.wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;

  > div:nth-child(1) {
    width: 15%;
    height: 100%;
  }

  > div:nth-child(2) {
    width: 85%;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    margin-left: 10px;

    > div:nth-child(1) {
      width: 100%;
      height: 5%;
      margin-bottom: 10px;
    }

    > div:nth-child(2) {
      width: 100%;
      height: 15%;
      margin-bottom: 10px;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
    }

    > div:nth-child(3) {
      width: 100%;
      height: 45%;
      margin-bottom: 10px;
      display: flex;
      flex-direction: row;
      justify-content: space-between;
    }

    > div:nth-child(4) {
      width: 100%;
      height: 40%;
      display: flex;
      flex-direction: row;
      justify-content: space-between;
    }
  }

  /* background-color: rgb(195, 188, 241); */
}

.title {
  border: 1px solid grey;
  border-radius: 4px;
  width: 200px;
  text-align: center;
}

.operateButton {
  cursor: pointer;
  font-size: 12px !important;
  padding: 8px;

  img {
    transform: translateY(-2px);
  }
}

.operateButton::after {
  display: inline-block;
  content: "";
  width: 1px;
  height: 18px;
  margin: 0 3px;
  transform: translate(6px, 3px);
  background: #000;
}

.operateButton:last-child::after {
  display: none;
}

::v-deep .el-select--mini {
  width: 100%;
}

::v-deep .el-date-editor {
  width: 100%;
}

::v-deep .el-scrollbar__thumb {
  background: #000;
  display: none;
}

// ::-webkit-scrollbar-thumb {
//   // display: none;
// }
::v-deep .el-table__empty-block {
  justify-content: left;
  text-align: left;
  padding-left: 40%;
}

::v-deep .el-select-dropdown {
  position: absolute !important;
  top: 80% !important;
  left: 0px !important;
}

::v-deep .el-card {
  border-radius: 4px;
  border: 1px solid #ebeef5;
  background-color: #fff;
  overflow: visible !important; //溢出不隐藏   隐藏的话，下拉框看不到全部数据
  color: #303133;
  transition: 0.3s;
  height: 100%;
}

.allDIV {
  border-radius: 4px;
  border: 1px solid #ebeef5;
  background-color: #fff;
  overflow: visible !important; //溢出不隐藏   隐藏的话，下拉框看不到全部数据
  color: #303133;
  transition: 0.3s;
  height: 100%;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.underTitle {
  width: 100%;
  height: 90%;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-content: center;
}

.underTitle2 {
  width: 100%;
  display: flex;
  flex-direction: row;
  // justify-content: space-between;
  align-content: center;
  flex-wrap: wrap;
  > div:nth-child(n) {
    width: 48.5%;
    height: 30%;
    display: flex;
    background: rgb(245, 245, 245);
    border-radius: 10px;
    justify-content: flex-start;
    align-items: center;
    margin: 0.5%;
  }
  // > div:nth-child(2) {
  //   width: 69%;
  //   height: 100%;
  // }
}

.child_right {
  // @include child_left;
  width: 100%;
  height: 30%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: baseline;
  // margin-top: 20%;
}

.left_text1 {
  display: flex;
  justify-content: center;
  text-align: center;
  align-content: center;
  vertical-align: middle;
  /* 垂直居中 */
  font-family: Source Han Sans CN;
  font-weight: bold;
  // font-size: 40px;
}

.itemList1 {
  width: 100%;
  height: 100px;
  margin: 25px 0px;
  background-repeat: no-repeat;
  background-position: center;
  padding-left: 10%;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: baseline;
  // background-image: url("@/assets/images/sjcdwl/底部1.png");
}

.child_left1 {
  height: 100%;
  width: 30%;
  display: flex;
  justify-content: end;
  align-items: center;
}

.zerostyle {
  width: 20%;
  height: 100%;
  color: aliceblue;
  justify-content: space-around;
  display: flex;
  flex-direction: column;
  > div:nth-child(n) {
    background: linear-gradient(to top, rgb(76, 197, 176), rgb(119, 217, 230));

    border-radius: 5px;
    width: 90%;
    height: 20%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }
}

.right_bottom {
  width: 100%;
  height: 30%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-content: space-around;
  > div:nth-child(n) {
    width: 48%;
    height: 35%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-content: center;
    > div:nth-child(n) {
      display: flex;
      flex-direction: column;
      width: 100%;
      justify-content: space-around;
      background: linear-gradient(
        to top,
        rgb(76, 197, 176),
        rgb(146, 218, 143)
      );
      width: 60%;
      border-radius: 10px;
      color: #fff;
      align-content: center;
    }
  }
}
</style>
